Feature: first version of Snowflake SPCS backend and authentication p…#100
Feature: first version of Snowflake SPCS backend and authentication p…#100damianslee wants to merge 3 commits intoopenanalytics:masterfrom
Conversation
…rovider. Notes: admin group IS ROLE IN SESSION is not working.
|
HI @LEDfan , have a couple questions
An example configuration is |
|
Another question, the Snowflake Java client was generated from the snowflake openapi specification github project using okhttp3. is there a preferred java http library to use to keep the package sizes and dependencies as small as possible? |
|
Hi Thanks a lot for the effort! We are always happy to add new backends, the only problem I see is that we don't have any snowflake deployments ourself. In order to guarantee maintenance on this backend, we need to look into whether we can use some trial or development license.
In the current implementation,the headers that are send to the application are not updated after the application has been started. This can be changed, although I'm not yet sure about the exact implementation. The headers are injected here: https://github.com/openanalytics/containerproxy/blob/master/src/main/java/eu/openanalytics/containerproxy/util/ProxyMappingManager.java#L260-L261
I believe these are added as labels in the task. But in general we consider it safe to add them to labels in the backend, but I wold not add them as environment variables (since the app should not see all these values).
I don't have lots of experience with Snowflake, could you elaborate your use-case of running ShinyProxy on Snowflake? |
|
typical deployment is shinyproxy running as snowflake service, then creates additional private services for users apps. the code to support shinyproxy external is to make development easier and faster. i dont think it will ever be used this way in production. use cases and benefits
|
…n Session with callers rights token and added 'compute-warehouse' config to perform the query. no rest api available yet to perform this. warehouse will need to be granted to snowflake service owner role as 'USAGE' and 'CALLER USAGE'.
|
the list of openapi java codegen which have Jackson json are here with different webclients. any of these won't introduce additional packages? search for "library template (sub-template) to use" will add an example SQL to setup the environment soon. |
|
It seems to me that the
I forgot to reply to this question: we usually don't implement app recovery for new backends. The operator is now available for both Docker and Kubernetes, and provides a much better experience. We might consider removing the app recovery feature. |
|
thanks will try redo the openapi java client soon. SPCS doesn't expose kubernetes. SPCS is closer to aws ECS, so the shinyproxy operator is not useable. i've found my backend restore implementation on SPCS makes it very easy to deploy shinyproxy without needing redis. i have a bunch of changes i need to test in next week to this implementation
|
add SPCS authentication single-sign-on. Snowflake account roles names can be used in shinyproxy "access-groups" or "admin-groups" mirror additional config from here https://docs.snowflake.com/en/developer-guide/snowpark-container-services/specification-reference add support block volumes and volume mounts to snowflake service containers. add support stage volumes and volume mounts to snowflake service containers. add support local volumes and volume mounts to snowflake service containers. add support memory volumes and volume mounts to snowflake service containers. add support for configuring secrets mapped as env variables or files. add Pause and Resume of proxies by suspend and resume of the snowflake service. which saves compute costs. Volumes can be used in container/image design to persist storage while paused/suspended. deleting services with volumes attached. currently not snapshot.
|
Snowpark container services further support. mirror additional config from here https://docs.snowflake.com/en/developer-guide/snowpark-container-services/specification-reference add Pause and Resume of proxies by suspend and resume of the snowflake service. which saves compute costs. |
|
some of the todo's remaining
Additional ideas
https://docs.snowflake.com/en/sql-reference/sql/create-service#optional-parameters Though there is no way for the backend to tell containerproxy that the service is suspended. would need polling spcs service state. or other thoughts how that could work. can health check function set proxy status to paused? |
|
sample shinyproxy config
|
Feature: first version of Snowflake SPCS backend and authentication provider.
Notes: admin group IS ROLE IN SESSION is not working.